%%
%% This is file `ctexcap.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% ctex.dtx  (with options: `sty,ctexcap')
%% 
%% This is a generated file.
%% 
%% Copyright 2003-2006
%% CTEX.ORG and any individual authors listed elsewhere in this file.
%% 
%% This file was generated from file(s) of the ctex package project.
%% -----------------------------------------------------------------
%% 
%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.2
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%% and version 1.2 or later is part of all distributions of LaTeX
%% version 1999/12/01 or later.
%% 
%% This file may only be distributed together with a copy of original
%% source files. You may however distribute original source files
%% without such generated files. Copying of this file is authorized
%% only if either:
%% (1) you make absolutely no changes to your copy, including name; OR
%% (2) if you do make changes, you first rename it to some other name.
%% 
%% To produce the documentation run the original source files ending
%% with `.dtx' through LaTeX.
%% 
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{ctexcaputf8}
  [2006/06/09 v0.8 ctex
   macros package]
\newif\ifCTEX@caption \CTEX@captiontrue
\DeclareOption{nocap}{\CTEX@captionfalse}
\DeclareOption{cap}{\CTEX@captiontrue}
\newcounter{CTEX@sectiondepth}
\setcounter{CTEX@sectiondepth}{2}
\DeclareOption{sub3section}{\setcounter{CTEX@sectiondepth}{3}}
\DeclareOption{sub4section}{\setcounter{CTEX@sectiondepth}{4}}
\ProcessOptions
\ifCTEX@caption
  \PassOptionsToPackage{cap}{ctex}
\fi
\RequirePackage{ctexutf8}
\@ifundefined{if@mainmatter}{\let\if@mainmatter\iftrue}{}
\ifCTEX@caption
  \AtEndOfPackage{%
    \makeatletter
    \InputIfFileExists{ctexcaputf8.cfg}{}{%
      \PackageError{ctex}{%
        Can't find ctexcaputf8.cfg}{%
        The english captions are used if you continue.}}
    \makeatother}
\fi
\def\CTEX@defsecformat#1{%
  \expandafter\def\csname CTEX@pre#1\endcsname{}%
  \expandafter\def\csname CTEX@post#1\endcsname{}%
  \expandafter\def\csname CTEX@the#1\endcsname{%
    \csname the#1\endcsname}%
  \expandafter\def\csname CTEXthe#1\endcsname{%
    \csname CTEX@pre#1\endcsname%
    \csname CTEX@the#1\endcsname%
    \csname CTEX@post#1\endcsname}%
  \expandafter\def\csname CTEX@#1@format\endcsname{}%
  \expandafter\def\csname CTEX@#1@nameformat\endcsname{}%
  \expandafter\def\csname CTEX@#1@numberformat\endcsname{}%
  \expandafter\def\csname CTEX@#1@aftername\endcsname{}%
  \expandafter\def\csname CTEX@#1@titleformat\endcsname{}
  \expandafter\def\csname CTEX@#1name\endcsname{%
    \csname CTEX@#1@nameformat\endcsname%
    \csname CTEX@pre#1\endcsname%
    \begingroup%
    \csname CTEX@#1@numberformat\endcsname%
    \csname CTEX@the#1\endcsname%
    \endgroup%
    \csname CTEX@post#1\endcsname%
    \csname CTEX@#1@aftername\endcsname}%
  \expandafter\def\csname CTEX@#1@beforeskip\endcsname{}%
  \expandafter\def\csname CTEX@#1@afterskip\endcsname{}%
  \expandafter\def\csname CTEX@#1@indent\endcsname{}%
}
\CTEX@defsecformat{part}
\CTEX@defsecformat{chapter}
\CTEX@defsecformat{section}
\CTEX@defsecformat{subsection}
\CTEX@defsecformat{subsubsection}
\CTEX@defsecformat{paragraph}
\CTEX@defsecformat{subparagraph}
\def\CTEX@prepart{Part\space}
\def\CTEX@prechapter{Chapter\space}
\def\CTEX@chapter@format{\raggedright}
\def\CTEX@chapter@nameformat{\huge\bfseries}
\def\CTEX@chapter@aftername{\par\nobreak\vskip 20\p@}
\def\CTEX@chapter@titleformat{\Huge\bfseries}
\def\CTEX@chapter@beforeskip{50\p@}
\def\CTEX@chapter@afterskip{40\p@}
\def\CTEX@chapter@indent{\z@}
\def\CTEX@section@format{\Large\bfseries}
\def\CTEX@section@aftername{\quad}
\def\CTEX@section@beforeskip{-3.5ex \@plus -1ex \@minus -.2ex}
\def\CTEX@section@afterskip{2.3ex \@plus .2ex}
\def\CTEX@section@indent{\z@}
\def\CTEX@subsection@format{\large\bfseries}
\def\CTEX@subsection@aftername{\quad}
\def\CTEX@subsection@beforeskip{-3.25ex \@plus -1ex \@minus -.2ex}
\def\CTEX@subsection@afterskip{1.5ex \@plus .2ex}
\def\CTEX@subsection@indent{\z@}
\def\CTEX@subsubsection@format{\normalsize\bfseries}
\def\CTEX@subsubsection@aftername{\quad}
\def\CTEX@subsubsection@beforeskip{-3.25ex \@plus -1ex \@minus -.2ex}
\def\CTEX@subsubsection@afterskip{1.5ex \@plus .2ex}
\def\CTEX@subsubsection@indent{\z@}
\def\CTEX@paragraph@format{\normalsize\bfseries}
\def\CTEX@paragraph@aftername{\quad}
\ifnum\c@CTEX@sectiondepth>2
  \def\CTEX@paragraph@beforeskip{-3.25ex \@plus -1ex \@minus -.2ex}
  \def\CTEX@paragraph@afterskip{1ex \@plus .2ex}
\else
  \def\CTEX@paragraph@beforeskip{3.25ex \@plus1ex \@minus .2ex}
  \def\CTEX@paragraph@afterskip{-1em}
\fi
\def\CTEX@paragraph@indent{\z@}
\def\CTEX@subparagraph@format{\normalsize\bfseries}
\def\CTEX@subparagraph@aftername{\quad}
\ifnum\c@CTEX@sectiondepth>3
  \def\CTEX@subparagraph@beforeskip{-3.25ex \@plus -1ex \@minus -.2ex}
  \def\CTEX@subparagraph@afterskip{1ex \@plus .2ex}
\else
  \def\CTEX@subparagraph@beforeskip{3.25ex \@plus1ex \@minus .2ex}
  \def\CTEX@subparagraph@afterskip{-1em}
\fi
\ifnum\c@CTEX@sectiondepth>2
  \def\CTEX@subparagraph@indent{\z@}
\else
  \def\CTEX@subparagraph@indent{\parindent}
\fi
\ifCTEX@cls{article}{
\def\CTEX@appendixname{}
}{
\def\CTEX@appendixname{Appendix\space}
}
\ifCTEX@cls{article}{
\def\CTEX@appendixnumber{\@Alph\c@section}
}{
\def\CTEX@appendixnumber{\@Alph\c@chapter}
}
\let\CTEX@save@appendix\appendix
\ifCTEX@cls{article}{
\renewcommand*\appendix{\CTEX@save@appendix%
  \gdef\CTEX@presection{\CTEX@appendixname}%
  \gdef\CTEX@thesection{\CTEX@appendixnumber}%
  \gdef\CTEX@postsection{}}%
}{
\renewcommand*\appendix{\CTEX@save@appendix%
  \gdef\CTEX@prechapter{\CTEX@appendixname}%
  \gdef\CTEX@thechapter{\CTEX@appendixnumber}%
  \gdef\CTEX@postchapter{}}%
}
\ifCTEX@cls{article}{
\renewcommand\part{%
   \if@noskipsec \leavevmode \fi
   \par
   \addvspace{\CTEX@part@beforeskip}%
   \@afterindentfalse
   \secdef\@part\@spart}
\def\@part[#1]#2{%
  \ifnum \c@secnumdepth >\m@ne
    \refstepcounter{part}%
    \addcontentsline{toc}{part}{\CTEXthepart\hspace{1em}#1}%
  \else
    \addcontentsline{toc}{part}{#1}%
  \fi
  {\interlinepenalty \@M
   \normalfont \parindent \CTEX@part@indent \CTEX@part@format
   \ifnum \c@secnumdepth >\m@ne
     \CTEX@partname
   \fi
   \CTEX@part@titleformat #2%
   \markboth{}{}\par}%
  \nobreak
  \vskip \CTEX@part@afterskip
  \@afterheading}
\def\@spart#1{%
    {\interlinepenalty \@M
     \normalfont \parindent \CTEX@part@indent \CTEX@part@format
     \CTEX@part@titleformat #1\par}%
     \nobreak
     \vskip \CTEX@part@afterskip
     \@afterheading}
}{
\def\@part[#1]#2{%
  \ifnum \c@secnumdepth >-2\relax
    \refstepcounter{part}%
    \addcontentsline{toc}{part}{\CTEXthepart\hspace{1em}#1}%
  \else
    \addcontentsline{toc}{part}{#1}%
  \fi
  \markboth{}{}%
  {\interlinepenalty \@M
   \normalfont \CTEX@part@format
   \ifnum \c@secnumdepth >-2\relax
     \CTEX@partname
   \fi
   \CTEX@part@titleformat #2\par}%
  \@endpart}
\def\@spart#1{%
    {\interlinepenalty \@M
     \normalfont \CTEX@part@format
     \CTEX@part@titleformat #1\par}%
    \@endpart}
}
\ifCTEX@cls{report}{
\def\@chapter[#1]#2{%
  \ifnum \c@secnumdepth >\m@ne
    \refstepcounter{chapter}%
    \typeout{\CTEXthechapter}%
    \addcontentsline{toc}{chapter}
      {\protect\numberline{\CTEXthechapter\hspace{0.3em}}#1}%
  \else
    \addcontentsline{toc}{chapter}{#1}%
  \fi
  \chaptermark{#1}%
  \addtocontents{lof}{\protect\addvspace{10\p@}}%
  \addtocontents{lot}{\protect\addvspace{10\p@}}%
  \if@twocolumn
    \@topnewpage[\@makechapterhead{#2}]%
  \else
    \@makechapterhead{#2}%
  \@afterheading
  \fi}
\def\@makechapterhead#1{%
  \vspace*{\CTEX@chapter@beforeskip}%
  {\normalfont \parindent \CTEX@chapter@indent \CTEX@chapter@format
   \ifnum \c@secnumdepth >\m@ne
     \CTEX@chaptername
   \fi
   \interlinepenalty\@M
   \CTEX@chapter@titleformat #1\par\nobreak
   \vskip \CTEX@chapter@afterskip
  }}
}{}
\ifCTEX@cls{book}{
\def\@chapter[#1]#2{%
  \ifnum \c@secnumdepth >\m@ne
    \if@mainmatter
      \refstepcounter{chapter}%
      \typeout{\CTEXthechapter}%
      \addcontentsline{toc}{chapter}
        {\protect\numberline{\CTEXthechapter\hspace{0.3em}}#1}%
    \else
      \addcontentsline{toc}{chapter}{#1}%
    \fi
  \else
    \addcontentsline{toc}{chapter}{#1}%
  \fi
  \chaptermark{#1}%
  \addtocontents{lof}{\protect\addvspace{10\p@}}%
  \addtocontents{lot}{\protect\addvspace{10\p@}}%
  \if@twocolumn
    \@topnewpage[\@makechapterhead{#2}]%
  \else
    \@makechapterhead{#2}%
  \@afterheading
  \fi}
\def\@makechapterhead#1{%
  \vspace*{\CTEX@chapter@beforeskip}%
  {\normalfont \parindent \CTEX@chapter@indent \CTEX@chapter@format
   \ifnum \c@secnumdepth >\m@ne
     \if@mainmatter
       \CTEX@chaptername
     \fi
   \fi
   \interlinepenalty\@M
   \CTEX@chapter@titleformat #1\par\nobreak
   \vskip \CTEX@chapter@afterskip
  }}
}{}
\def\@makeschapterhead#1{%
  \vspace*{\CTEX@chapter@beforeskip}%
  {\normalfont \parindent \CTEX@chapter@indent \CTEX@chapter@format
   \interlinepenalty\@M
   \CTEX@chapter@titleformat #1\par\nobreak
   \vskip \CTEX@chapter@afterskip
  }}
\def\@seccntformat#1{%
  \@ifundefined{CTEX@#1name}%
    {\csname the#1\endcsname\quad}%
    {\csname CTEX@#1name\endcsname}}
\def\@sect#1#2#3#4#5#6[#7]#8{%
  \ifnum #2>\c@secnumdepth
    \let\@svsec\@empty
  \else
    \refstepcounter{#1}%
    \protected@edef\@svsec{\@seccntformat{#1}\relax}%
  \fi
  \@tempskipa #5\relax
  \ifdim \@tempskipa>\z@
    \begingroup
      #6{%
        \@hangfrom{\hskip #3\relax\@svsec}%
        \interlinepenalty \@M
        \csname CTEX@#1@titleformat\endcsname #8\@@par}%
    \endgroup
    \csname #1mark\endcsname{#7}%
    \addcontentsline{toc}{#1}{%
      \ifnum #2>\c@secnumdepth \else
        \protect\numberline{\@ifundefined{CTEXthe#1}%
                              {\csname the#1\endcsname}%
                              {\csname CTEXthe#1\endcsname}}%
      \fi
      #7}%
  \else
    \def\@svsechd{%
    #6{\hskip #3\relax
      \@svsec \csname CTEX@#1@titleformat\endcsname #8}%
    \csname #1mark\endcsname{#7}%
    \addcontentsline{toc}{#1}{%
      \ifnum #2>\c@secnumdepth \else
        \protect\numberline{\@ifundefined{CTEXthe#1}%
                              {\csname the#1\endcsname}%
                              {\csname CTEXthe#1\endcsname}}%
      \fi
      #7}}%
  \fi
  \@xsect{#5}}
\def\numberline#1{%
  \settowidth\@tempdimb{#1\hspace{0.5em}}%
  \ifdim\@tempdima<\@tempdimb%
    \@tempdima=\@tempdimb%
  \fi%
  \hb@xt@\@tempdima{#1\hfil}}
\renewcommand\section{\@startsection{section}{1}%
                                   {\CTEX@section@indent}%
                                   {\CTEX@section@beforeskip}%
                                   {\CTEX@section@afterskip}%
                                   {\normalfont\CTEX@section@format}}
\renewcommand\subsection{\@startsection{subsection}{2}%
                                   {\CTEX@subsection@indent}%
                                   {\CTEX@subsection@beforeskip}%
                                   {\CTEX@subsection@afterskip}%
                                   {\normalfont\CTEX@subsection@format}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}%
                                   {\CTEX@subsubsection@indent}%
                                   {\CTEX@subsubsection@beforeskip}%
                                   {\CTEX@subsubsection@afterskip}%
                                   {\normalfont\CTEX@subsubsection@format}}
\renewcommand\paragraph{\@startsection{paragraph}{4}%
                                   {\CTEX@paragraph@indent}%
                                   {\CTEX@paragraph@beforeskip}%
                                   {\CTEX@paragraph@afterskip}%
                                   {\normalfont\CTEX@paragraph@format}}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}%
                                   {\CTEX@subparagraph@indent}%
                                   {\CTEX@subparagraph@beforeskip}%
                                   {\CTEX@subparagraph@afterskip}%
                                   {\normalfont\CTEX@subparagraph@format}}
\ifCTEX@cls{article}{
\if@twoside
  \def\ps@headings{%
      \let\@oddfoot\@empty\let\@evenfoot\@empty
      \def\@evenhead{\thepage\hfil\slshape\leftmark}%
      \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
      \let\@mkboth\markboth
    \def\sectionmark##1{%
      \markboth {\MakeUppercase{%
        \ifnum \c@secnumdepth >\z@
          \CTEXthesection\quad %
        \fi
        ##1}}{}}%
    \def\subsectionmark##1{%
      \markright {%
        \ifnum \c@secnumdepth >\@ne
          \CTEXthesubsection\quad %
        \fi
        ##1}}}
\else
  \def\ps@headings{%
    \let\@oddfoot\@empty
    \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
    \let\@mkboth\markboth
    \def\sectionmark##1{%
      \markright {\MakeUppercase{%
        \ifnum \c@secnumdepth >\m@ne
          \CTEXthesection\quad %
        \fi
        ##1}}}}
\fi
}{\ifCTEX@cls{report}{
\if@twoside
  \def\ps@headings{%
      \let\@oddfoot\@empty\let\@evenfoot\@empty
      \def\@evenhead{\thepage\hfil\slshape\leftmark}%
      \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
      \let\@mkboth\markboth
    \def\chaptermark##1{%
      \markboth {\MakeUppercase{%
        \ifnum \c@secnumdepth >\m@ne
          \CTEXthechapter \quad %
        \fi
        ##1}}{}}%
    \def\sectionmark##1{%
      \markright {\MakeUppercase{%
        \ifnum \c@secnumdepth >\z@
          \CTEXthesection \quad %
        \fi
        ##1}}}}
\else
  \def\ps@headings{%
    \let\@oddfoot\@empty
    \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
    \let\@mkboth\markboth
    \def\chaptermark##1{%
      \markright {\MakeUppercase{%
        \ifnum \c@secnumdepth >\m@ne
          \CTEXthechapter \quad %
        \fi
        ##1}}}}
\fi
}{
\if@twoside
  \def\ps@headings{%
      \let\@oddfoot\@empty\let\@evenfoot\@empty
      \def\@evenhead{\thepage\hfil\slshape\leftmark}%
      \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
      \let\@mkboth\markboth
    \def\chaptermark##1{%
      \markboth {\MakeUppercase{%
        \ifnum \c@secnumdepth >\m@ne
          \if@mainmatter
            \CTEXthechapter \quad %
          \fi
        \fi
        ##1}}{}}%
    \def\sectionmark##1{%
      \markright {\MakeUppercase{%
        \ifnum \c@secnumdepth >\z@
          \CTEXthesection \quad %
        \fi
        ##1}}}}
\else
  \def\ps@headings{%
    \let\@oddfoot\@empty
    \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
    \let\@mkboth\markboth
    \def\chaptermark##1{%
      \markright {\MakeUppercase{%
        \ifnum \c@secnumdepth >\m@ne
          \if@mainmatter
            \CTEXthechapter \quad %
          \fi
        \fi
        ##1}}}}
\fi
}}
\pagestyle{headings}
\@ifundefined{ps@fancy}{}{%
  \def\ps@fancy{%
  \@ifundefined{@chapapp}{\let\@chapapp\chaptername}{}%for amsbook
  \@ifundefined{MakeUppercase}{\def\MakeUppercase{\uppercase}}{}%
  \@ifundefined{chapter}{\def\sectionmark##1{\markboth
  {\MakeUppercase{\ifnum \c@secnumdepth>\z@
   \CTEXthesection\quad \fi ##1}}{}}%
  \def\subsectionmark##1{\markright {\ifnum \c@secnumdepth >\@ne
   \CTEXthesubsection\quad \fi ##1}}}%
  {\def\chaptermark##1{\markboth {\MakeUppercase{\ifnum \c@secnumdepth>\m@ne
   \ifCTEX@cls{book}{\if@mainmatter\CTEXthechapter \quad\fi}{\CTEXthechapter \quad}
   \fi ##1}}{}}%
  \def\sectionmark##1{\markright{\MakeUppercase{\ifnum \c@secnumdepth >\z@
   \CTEXthesection \quad \fi ##1}}}}%
  \ps@@fancy
  \gdef\ps@fancy{\@fancyplainfalse\ps@@fancy}%
  \ifdim\headwidth<0sp
      \global\advance\headwidth123456789sp\global\advance\headwidth\textwidth
  \fi}
}
\def\CTEX@contentsname{Contents}
\def\CTEX@listfigurename{List of Figures}
\def\CTEX@listtablename{List of Tables}
\def\CTEX@figurename{Figure}
\def\CTEX@tablename{Table}
\def\CTEX@abstractname{Abstract}
\def\CTEX@indexname{Index}
\def\CTEX@bibname{Bibliography}
\renewcommand*\contentsname{\CTEX@contentsname}
\renewcommand*\listfigurename{\CTEX@listfigurename}
\renewcommand*\listtablename{\CTEX@listtablename}
\renewcommand*\figurename{\CTEX@figurename}
\renewcommand*\tablename{\CTEX@tablename}
\@ifundefined{abstractname}{}{
  \renewcommand*\abstractname{\CTEX@abstractname}}
\renewcommand*\partname{\CTEX@thepart}
\@ifundefined{chaptername}{}{
  \renewcommand*\chaptername{\CTEX@thechapter}}
\renewcommand*\appendixname{\CTEX@appendixname}
\renewcommand*\indexname{\CTEX@indexname}
\ifCTEX@cls{article}{
  \renewcommand*\refname{\CTEX@bibname}
  }{
  \renewcommand*\bibname{\CTEX@bibname}
  }
\def\CTEX@setsecname#1[#2,#3]{%
  \expandafter\def\csname CTEX@pre#1\endcsname{#2}%
  \expandafter\def\csname CTEX@post#1\endcsname{\ignorespaces#3}}
\def\CTEX@setsecnumber#1[#2]{%
  \expandafter\def\csname CTEX@the#1\endcsname{#2}}
\def\CTEX@setsecformat#1#2[#3]{%
  \expandafter\def\csname CTEX@#1@#2\endcsname{#3}}
\def\CTEX@addsecformat#1#2[#3]{%
  \expandafter\let\expandafter\reserved@a\csname CTEX@#1@#2\endcsname%
  \expandafter\expandafter\expandafter\def\expandafter\expandafter%
    \csname CTEX@#1@#2\endcsname\expandafter{\reserved@a#3}}
\def\CTEX@defseckey#1{%
  \CTEX@subkey{#1}{name}{\CTEX@setsecname{#1}[##1]}%
  \CTEX@subkey{#1}{number}{\CTEX@setsecnumber{#1}[##1]}%
  \CTEX@subkey{#1}{format}{\CTEX@setsecformat{#1}{format}[##1]}%
  \CTEX@subkey{#1}{format+}{\CTEX@addsecformat{#1}{format}[##1]}%
  \CTEX@subkey{#1}{nameformat}{\CTEX@setsecformat{#1}{nameformat}[##1]}%
  \CTEX@subkey{#1}{nameformat+}{\CTEX@addsecformat{#1}{nameformat}[##1]}%
  \CTEX@subkey{#1}{numberformat}{\CTEX@setsecformat{#1}{numberformat}[##1]}%
  \CTEX@subkey{#1}{numberformat+}{\CTEX@addsecformat{#1}{numberformat}[##1]}%
  \CTEX@subkey{#1}{aftername}{\CTEX@setsecformat{#1}{aftername}[##1]}%
  \CTEX@subkey{#1}{aftername+}{\CTEX@addsecformat{#1}{aftername}[##1]}%
  \CTEX@subkey{#1}{titleformat}{\CTEX@setsecformat{#1}{titleformat}[##1]}%
  \CTEX@subkey{#1}{titleformat+}{\CTEX@addsecformat{#1}{titleformat}[##1]}%
  \CTEX@subkey{#1}{beforeskip}{\CTEX@setsecformat{#1}{beforeskip}[##1]}%
  \CTEX@subkey{#1}{afterskip}{\CTEX@setsecformat{#1}{afterskip}[##1]}%
  \CTEX@subkey{#1}{indent}{\CTEX@setsecformat{#1}{indent}[##1]}%
}
\CTEX@defseckey{part}
\CTEX@defseckey{chapter}
\CTEX@defseckey{section}
\CTEX@defseckey{subsection}
\CTEX@defseckey{subsubsection}
\CTEX@defseckey{paragraph}
\CTEX@defseckey{subparagraph}
\CTEX@subkey{appendix}{name}{\def\CTEX@appendixname{#1}}
\CTEX@subkey{appendix}{number}{\def\CTEX@appendixnumber{#1}}
\CTEX@key{contentsname}{\def\CTEX@contentsname{#1}}
\CTEX@key{listfigurename}{\def\CTEX@listfigurename{#1}}
\CTEX@key{listtablename}{\def\CTEX@listtablename{#1}}
\CTEX@key{figurename}{\def\CTEX@figurename{#1}}
\CTEX@key{tablename}{\def\CTEX@tablename{#1}}
\CTEX@key{abstractname}{\def\CTEX@abstractname{#1}}
\CTEX@key{indexname}{\def\CTEX@indexname{#1}}
\CTEX@key{bibname}{\def\CTEX@bibname{#1}}
\def\CTEX@caption@delimiter{: }
\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip
  \sbox\@tempboxa{#1\CTEX@caption@delimiter #2}%
  \ifdim \wd\@tempboxa >\hsize
    #1\CTEX@caption@delimiter #2\par
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}
\CTEX@key{captiondelimiter}{\CTEX@setcaptiondelimiter{#1}}
\newcommand*\CTEX@setcaptiondelimiter[1]{%
  \def\CTEX@caption@delimiter{#1}}
\endinput
%%
%% End of file `ctexcaputf8.sty'.
